<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>用户</title>
        <link rel="stylesheet" href="__PUBLIC__/Leader/css/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Leader/css/index.css" />
        <style type="text/css">
            .order-list a {
                position: relative;
            }
            .order-list span {
                float: right;
                margin-right: 20px;
            }
            #tab .form-control:not(:last-of-type){
                margin-bottom:20px;
            }
        </style>
    </head>
    <body>
        <include file="Index/head"/>
        <div class="wrapper main-wrapper wrapper-content ">
            <div class="page-menubar">
                <!--<div class="menu-header">系统管理</div>-->
                <ul class="order-list">
                    <li>
                        <a href="{:U('Useradmin/userinfo')}"><img src="__PUBLIC__/images/ic-19.png" alt="" class="com-icon">系统管理员</a>
                    </li>
                    <li >
                        <a href="{:U('Useradmin/adduser')}"><img src="__PUBLIC__/images/ic-20.png" alt="" class="com-icon">添加用户</a>
                    </li>
                    <li class="active">
                        <a href="{:U('pay/paysetting')}"><img src="__PUBLIC__/images/ic-21.png" alt="" class="com-icon">系统设定</a>
                    </li>
                </ul>
            </div>
            <!--主要内容-->
            <div class="page-content" style="display: block;">
                <!--内容标题-->

                <div class="panel panel-default" style="margin-top: 20px;">
                    <div class="panel-body">
                        <div id="myTabContent" class="tab-content">
                            <div class="tab-pane active in" id="home">
                            <form id="tab" >
                                <div class="form-group">
                                    <label>appid：</label>

                                    <input type="text" value="{$us.appid}" name="appid" class="form-control">


                                <label>appsecret：</label>
                                <input type="hidden" value="{$us.id}" name="id" class="form-control">
                                <input type="text" value="{$us.appsecret}" name="appsecret" class="form-control">
                                <label>Encodingaeskey：</label>
                                <input type="text" value="{$us.encodingaeskey}" name="encodingaeskey" class="form-control">
                                <label>Token:</label>
                                <input type="text" value="{$us.token}" name="token" class="form-control">
                                <label>商户号：</label>
                                <input type="text" value="{$us.partnerid}" name="partnerid" class="form-control">
                                <label>商户秘钥：</label>
                                <input type="text" value="{$us.partnerkey}" name="partnerkey" class="form-control">
                                <label>商户名称：</label>
                                <input type="text" value="{$us.merchant}" name="merchant" class="form-control">
                                
                                <label>下单通知人Openid：</label>
                                <input type="text" value="{$us.admin_openid}" name="admin_openid" class="form-control">
                                <label>下单通知模板：</label>
                                <input type="text" value="{$us.ordertemplate}" name="ordertemplate" class="form-control">  
                                <label>客户通知模板：</label>
                                <input type="text" value="{$us.tztemplate}" name="tztemplate" class="form-control">   
                                <label>支付通知模板：</label>
                                <input type="text" value="{$us.xdtemplate}" name="xdtemplate" class="form-control">   
                                <br />
                                <button  type="button" class="btn btn-primary" onclick="tj()">修改</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="__PUBLIC__/Leader/js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="__PUBLIC__/Leader/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        function tj(){

            $.ajax({
                type: "POST",
                url: "/admin.php?s=/pay/Paysetting",

                cache: false,
                data: $('#tab').serialize(),

                success: function(data) {
                    data=$.trim(data);
                    switch(data){

                        case '0':
                            alert('修改成功');
                            window.location.replace("/admin.php?s=/pay/Paysetting")
                            break;
                        case '1':
                            alert('修改失败');

                            break;
                        case '3':
                            alert('用户编号已存在');

                            break;

                        default:
                            alert(data);
                    }

                }




            })


        }
    </script>


</html>